#ifndef SERVER_H_
#define SERVER_H_
#include "../SocketsAndThreads/thread.h"
#include "../SocketsAndThreads/mutex.h"
#include "../SocketsAndThreads/errors.h"
#include "../SocketsAndThreads/socket.h"
#include <cmath>
#include <iostream>
#include <vector>
#include <stack>
#include <fstream>
#include <stdlib.h>
#include "server_configuration.h"
#include "../Utils/directoryHandler.h"
#include "server_client_thread.h"
#include "server_clients_cleaner.h"
#include <log4cpp/Category.hh>
#include <log4cpp/FileAppender.hh>
#include <log4cpp/SimpleLayout.hh>
extern log4cpp::Category& category;
using namespace std;
class Servidor: public Thread {
private:
	//Socket para escuchar por conexiones entrantes
	Socket* sock;
	//Configuracion del server
	ServerCfg cfg;
	//Aca se guardan los clientes conectados
	vector<ClientThread*> clients_threads;
public:
	Servidor(ServerCfg* cfg, Socket* sock);
	~Servidor();
	//Corre el servidor
	void run();

};

#endif /* SERVER_H_ */
